package cn.myspringboot.system.mapper;

import cn.myspringboot.base.mapper.BaseMapper;
import cn.myspringboot.user.domain.Employee;
import cn.myspringboot.user.domain.Role;
import cn.myspringboot.user.query.EmployeeQuery;
import cn.myspringboot.user.query.RoleQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper extends BaseMapper<Employee> {
    List<Employee> selectEmployeePage(EmployeeQuery query);
    Integer selectEmployeePageCount(EmployeeQuery query);

    List<Role> getRoleByName();

    void delByRolesAndEmployeeId(Long id);

    void addByRolesAndEmployeeId(@Param("id") Long id,@Param("roleIds") List<Long> roleIds);
}
